#ifndef __MCPERPENDICULARCONSTRAINTVISUAL_H_
#define __MCPERPENDICULARCONSTRAINTVISUAL_H_

#include <MCConstraintVisual.h>
#include <MCSegmentVisual.h>

class MCPerpendicularConstraint;

class MCPerpendicularConstraintVisual : public MCConstraintVisual
{
public:

    MCPerpendicularConstraintVisual(ICanvas *presenter, MCPerpendicularConstraint *constraint);

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
    QPainterPath shape() const override;

    void setHighlight(ItemHighlight highlight) override;

private:

    MCPoint2D transformedPoint1() const;
    MCPoint2D transformedPoint2() const;

private:

    MCPerpendicularConstraint *_constraint;

    MCSegmentVisual *_segv1;
    MCSegmentVisual *_segv2;

};

#endif // !__MCPERPENDICULARCONSTRAINTVISUAL_H_
